/******
 * p11-37 取地址运算
 */

//init
void setup(){
    int num;               //int
    int *ptrNum;           //pointer

    ptrNum = &num;         //num的地址赋值给 ptrNum指针
    
    Serial.begin(9600);
    
    Serial.print("addr of int：");    
    //Serial.println(&num);     //error         
    Serial.println((long)&num); //不能直接输出，要转换成长整型
    Serial.println((long)ptrNum);
}

//loop
void loop() {
  
}
